package com.niit.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;

public class Order {

    /** 订单id */
    private int id;

    /** 订单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date orderTime;

    /** 商品id */
    private int productId;

    /** 购买量 */
    private int quantity;

    /** 收货地址 */
    private String address;

    /** 收货人电话 */
    private String recipientPhone;

    /** 收货人姓名 */
    private String recipientName;



    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Date orderTime) {
        this.orderTime = orderTime;
    }

    public int getProductId() {
        return productId;
    }

    public void setProductId(int productId) {
        this.productId = productId;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getRecipientPhone() {
        return recipientPhone;
    }

    public void setRecipientPhone(String recipientPhone) {
        this.recipientPhone = recipientPhone;
    }

    public String getRecipientName() {
        return recipientName;
    }

    public void setRecipientName(String recipientName) {
        this.recipientName = recipientName;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id=" + id +
                ", orderTime=" + orderTime +
                ", productId=" + productId +
                ", quantity=" + quantity +
                ", address='" + address + '\'' +
                ", recipientPhone='" + recipientPhone + '\'' +
                ", recipientName='" + recipientName + '\'' +
                '}';
    }
}
